<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <script src="../js/jquery-3.4.1.slim.min.js"></script>
    <script src="../js/popper.min.js"></script>
    <script src="../js/bootstrap.min.js" type="application/javascript"></script>
    <style>
        html,
        body {
            height: 100%;
        }
        body {
            display: -ms-flexbox;
            display: flex;
            -ms-flex-align: center;
            align-items: center;
            padding-top: 40px;
            padding-bottom: 40px;
            background-color: #f5f5f5;
        }
        .form-signin {
            width: 100%;
            max-width: 330px;
            padding: 15px;
            margin: auto;
        }
        .form-signin .checkbox {
            font-weight: 400;
        }
        .form-signin .form-control {
            position: relative;
            box-sizing: border-box;
            height: auto;
            padding: 10px;
            font-size: 16px;
        }
        .form-signin .form-control:focus {
            z-index: 2;
        }
        .form-signin input[type="email"] {
            margin-bottom: -1px;
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }
        .form-signin input[type="password"] {
            margin-bottom: 10px;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }
    </style>
</head>
<body >


<form class="form-signin" method="post" th:action="@{userLogin}" th:object="${adminUser}">
    <img class="mb-4" src="../imgs/admin.jpg" alt="" width="300" height="130">
    <h1 class="h3 mb-3 font-weight-normal">管理员登录</h1>
    <label class="sr-only">username</label>

    <input type="text" id="username" class="form-control"  th:field="*{username}"
           placeholder="name" required autofocus>
    <label for="password" class="sr-only">Password</label>
    <input type="password" id="password"   class="form-control" th:field="*{password}"
           placeholder="Password" required>

    <div class="alert alert-danger" role="alert" id="warning" th:if="${message}"
         th:text="${message}"></div>



    <button class="btn btn-success btn-lg btn-block" type="submit">登  录</button>

    <p class="text-muted">&copy; 佛大闲置交易论坛</p>
</form>
</body>

</html>